<%@ page language="java"  pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<script>
function deleteSingle(byval)
{
	if(confirm("确认删除么？"))
	{
		document.getElementById(byval).checked=true;
		document.forms[0].action="/OpenAuthWebApplication/usr/usrDeleteAction!delete.action";
		document.forms[0].submit();
	}
}
function updateSingle(byval)
{
	document.getElementById("userId").value=byval;
	document.forms[0].action="/OpenAuthWebApplication/usr/usrInitAction!init.action?oper=update";
	document.forms[0].submit();
}
</script>
<jsp:include page="/public/public.jsp"/> 
</head>
<body  >
<jsp:include page="/public/head.jsp"/>  
    <div class="wrapper clearfix">
    <jsp:include page="/public/left.jsp"/>  
	<div class="main">
<s:form name="usr" action="usrAction.action" namespace="/usr">

<table class="advert-tab" cellspacing="0">
<tr class="advert-th">
	<th colspan="6" style="text-align:left;">&nbsp;&nbsp;用户管理&gt;&gt;用户信息列表</th>
	</tr>
	<tr>
		<td>用户名</td>
		<td><input type="text" name="username" value="${username }"/></td>
		<td>组织机构代码</td>
		<td><input type="text" name="corporateCode" value="${corporateCode }"/></td>
		<td>地址</td>
		<td><input type="text" name="address" value="${address }"/></td>
	</tr>
	<tr>
		<td>电话号码</td>
		<td><input type="text" name="phone" value="${phone }"/></td>
		<td>传真号码</td>
		<td><input type="text" name="fax" value="${fax }"/></td>
		<td>电子邮件</td>
		<td><input type="text" name="email" value="${email }"/></td>
	</tr>
	<tr>
		<td>用户描述</td>
		<td><input type="text" name="description" value="${description }"/></td>
		<td>身份证号</td>
		<td><input type="text" name="idCard" value="${idCard }"/></td>
		<td>注册IP</td>
		<td><input type="text" name="registerIp" value="${registerIp }"/></td>
	</tr>
	<tr>
		<td>注册日期：
		</td>
		
		<td><input type="text" name="registerDate" value="1982-1-1" size="14" readonly onClick="showcalendar(event, this);" onFocus="showcalendar(event, this);if(this.value=='0000-00-00')this.value=''"/> </td>
		<td>警号</td>
		<td><input type="text" name="userPoliceNo" value="${userPoliceNo }"/></td>
		<td colspan=3>
		<input type="submit"  value="查询"/>&nbsp;
		<input type="button" onclick="location.href='/OpenAuthWebApplication/usr/usrInitAction!init.action?oper=save'" value="添加"/>&nbsp;
		<input type="button" value="删除"/>
		<input type="hidden" value="" name="userId" id="userId"/>
		</td>
	</tr>
</table>
<table class="advert-tab" cellspacing="0">
	<s:if test="#request.list.size==0">
	<tr>
		<td colspan="6">
			没有需要显示的数据！
		</td>
	</tr>
	</s:if>
	<s:else>
<tr class="advert-th">
	<th>&nbsp;</th>
	<th>操作</th>
	<th>操作</th>
		<th>用户名</th>
		<th>组织机构代码</th>
		<th>地址</th>
		<th>电话号码</th>
		<th>传真号码</th>
		<th>电子邮件</th>
		<th>用户描述</th>
		<th>身份证号</th>
		<th>注册IP</th>
		<th>注册时期</th>
		<th>警号</th>
	</tr>
	<s:iterator  value="#request.actionPageBean.data" id="usr" status="usrlist">
	<tr>
		<td><input type="checkbox" name="userIds" id="chk_<s:property value="#usr.userId" />" value="<s:property value="#usr.userId" />"/></td>
		<td><a href="javascript:updateSingle('<s:property value="#usr.userId" />')">修改</a></td>
		<td><a href="javascript:deleteSingle('chk_<s:property value="#usr.userId" />')">删除</a></td>
		<td><s:property value="#usr.username" />&nbsp;</td>
		<td><s:property value="#usr.corporateCode" />&nbsp;</td>
		<td><s:property value="#usr.address" />&nbsp;</td>
		<td><s:property value="#usr.email" />&nbsp;</td>
		<td><s:property value="#usr.phone" />&nbsp;</td>
		<td><s:property value="#usr.fax" />&nbsp;</td>
		<td><s:property value="#usr.description" />&nbsp;</td>
		<td><s:property value="#usr.idCard" />&nbsp;</td>
		<td><s:property value="#usr.registerIp" />&nbsp;</td>
		<td> <s:date name="#usr.registerDate"/>&nbsp;</td>
		<td><s:property value="#usr.userPoliceNo" />&nbsp;</td>
	</tr>
	</s:iterator>
	</s:else>
</table>

<table class="advert-tab" cellspacing="0">
<tr>
	<td>
		<input type="hidden" name="currentPageNo" value="${currentPageNo}"/>
		<input type="hidden" name="prevPageNo" value="${prevPageNo}"/>
		<input type="hidden" name="nextPageNo" value="${nextPageNo}"/>
		<input type="hidden" name="totalCount" value="${totalCount}"/>
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/usr/usrPageAction!getFirstPage.action'" value="首 页"/>&nbsp;
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/usr/usrPageAction!getPrevPage.action'" value="上一页"/>&nbsp;
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/usr/usrPageAction!getNextPage.action'" value="下一页"/>&nbsp;
	</td>
	<td colspan=3>
		<input type="button" onclick="location.href='/OpenAuthWebApplication/usr/usrPageAction!getLastPage.action'" value="末 页"/>&nbsp;
	</td>
</tr>
</table>

</s:form>
</div>
</div>
<%@ include file="/public/footer.jsp"%>
</body>
</html>